package com.example.db.entity;

import cn.hutool.core.util.IdUtil;
import lombok.Data;
import lombok.ToString;
import org.hibernate.annotations.GeneratorType;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.domain.Persistable;
import org.springframework.data.jpa.domain.AbstractPersistable;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;

/**
 * @author L.xf
 * @date 2021/10/27
 */
@Data
@Table(name = "t_user")
@Entity
@ToString(callSuper = true)
public class User extends BaseEntity {

    private String name;
    private String phone;
    private String email;
    private String password;


    public static List<User> createUsers() {
        int size = 100000;
        List<User> users = new ArrayList<>(size);
        for (int i = 0; i < size; i++) {
            User user = new User();
            user.setName("测试名字" + i);
            user.setEmail("123@qq.com");
            user.setPassword("12345678");
            users.add(user);
        }
        return users;
    }

}
